#include <string>

using namespace std;

class Solution {
public:
    int maxPower(string s) {
        char c = ' ';
        int num = 0;
        int ans = 0;
        for (char& it : s) {
            if (it == c) {
                num++;
            } else {
                c = it;
                ans = max(num, ans);
                num = 1;
            }
        }
        ans = max(num, ans);
        return ans;
    }
};